home *** CD-ROM | disk | FTP | other *** search
- Xref: bloom-picayune.mit.edu comp.fonts:6624 news.answers:4476
- Path: bloom-picayune.mit.edu!enterpoop.mit.edu!think.com!rpi!zaphod.mps.ohio-state.edu!caen!nic.umass.edu!dime!dime.cs.umass.edu!walsh
- From: walsh@cs.umass.edu (Norman Walsh)
- Newsgroups: comp.fonts,news.answers
- Subject: comp.fonts FAQ.3.MS-DOS-Info
- Summary: This posting answers frequently asked questions about fonts.
- It addresses both general font questions and questions that
- are specific to a particular platform.
- Message-ID: <WALSH.92Dec7141536@ibis.cs.umass.edu>
- Date: 7 Dec 92 19:15:36 GMT
- Expires: 8 Jan 93 00:00:00 GMT
- References: <9212071410.WW57338@cs.umass.EDU>
- Sender: news@dime.cs.umass.edu
- Reply-To: walsh@cs.umass.edu (Norm Walsh)
- Followup-To: poster
- Organization: Dept of Comp and Info Sci, Univ of Mass (Amherst)
- Lines: 473
- Approved: news-answers-request@MIT.Edu
-
- Archive-name: fonts-faq/part04
- Version: 1.1.1.
-
- FAQ for comp.fonts: Chapter III: MS-DOS-specific Info
-
- Version 1.1.1., Release 07DEC92
-
- Welcome to the comp.fonts FAQ. These articles, posted monthly, describe many
- of the basic questions that seem to be repeated frequently on comp.fonts.
- Your comments are both welcome and encouraged.
-
- The FAQ is divided into chapters. The first chapter is a general overview.
- Most of the remaining chapters are more-or-less platform specific.
-
- For more information about the FAQ, please consult the beginning of the first
- chapter. The FAQ is always available via anonymous ftp from ibis.cs.umass.edu
- in /pub/norm/comp.fonts/FAQ*
-
- This chapter covers the following topics:
-
- 1. MS-DOS font notes
- 2. Font installation
- 3. Font utilities
- 4. Converting Macintosh Type1 fonts to MS-DOS format
- 5.1 Converting PC Type1 fonts into TeX PK bitmap fonts
- 5.2 Converting TeX PK bitmaps into HP LaserJet softfonts (and vice-versa)
- 5.3 Converting TrueType fonts to HP LaserJet bitmap softfonts (HACK!)
- 6. MS-DOS Screen Fonts (EGA/VGA text-mode fonts)
-
- ------------------------------------------------------------------------------
-
- 1. MS-DOS font notes
-
- The easiest way to get outline fonts under MS-DOS is with MicroSoft
- Windows 3.x or OS/2 2.x.
-
- MicroSoft Windows 3.0 with Adobe Type Manager (ATM) and OS/2 2.0 support
- PostScript Type1 fonts.
-
- MicroSoft Windows 3.1 supports TrueType fonts natively.
-
- Bitmap fonts are available in a variety of formats: most formats are
- designed with the printer in mind and not the display since (prior to
- graphical environments like Windows, GEM, and OS/2) the majority of work
- under MS-DOS was done with a character-based interface.
-
- 1.2. Frequently requested fonts
-
- Many fonts are available at various archives. The biggest font archive
- for MS-DOS format fonts is ftp.cica.indiana.edu. Note: you can use any
- Mac format Type1 font on your PC by converting it to PC format with the
- free/shareware as described below.
-
- The following fonts are in Type 1 format for MS-DOS. Some are also
- available in TrueType format.
-
- Hebrew ShalomScript, ShalomOldStyle, ShalomStick
-
- Japanese Shorai
-
- Start Trek Crillee, TNG monitors
-
- 2. Font Installation
-
- If you have any information that you feel belongs in this section, it
- would be greatly appreciated.
-
- Windows
-
- Pat Farrell <pfarrell@cs.gmu.edu> contributes the following description
- of font installation under Windows.
-
- Installing Fonts into Windows:
-
- This only covers Windows 3.1. Font is a four-letter word in Windows
- versions prior to 3.1 due to the distinctions between screen fonts and
- printer fonts. The upgrade price of Windows 3.1 is justified by the
- integration of TrueType into the package and the inclusion of useful
- fonts for all printers.
-
- Commercial fonts usually have installation instructions with their
- manuals. The approach may differ from the method used for PD and
- shareware fonts.
-
- To install PD and shareware fonts in Windows 3.1:
-
- 1. Copy the fonts onto a suitable scratch area (i.e. a floppy, or any
- temporary area of your hard disk.
-
- 2. Execute "Control Panel" by double-clicking on the icon in the
- Windows Program Manager's "main" group.
-
- 3. Double-click on the Fonts icon.
-
- 4. Double-click on the "Add" button.
-
- 5. Select the scratch directory holding the new fonts.
-
- 6. A list of the fonts will be displayed. You can manually select the
- fonts you like, or you can use the "Select All" button.
-
- 7. Make sure the "Copy Fonts to Windows Directory" check-box is
- checked. This will copy the fonts from the scratch area to your
- Windows directory.
-
- 8. Click on the "Ok" button.
-
- Special notes for Windows applications:
-
- Word for Windows (W4W) stores font/printer information in its own
- initialization files. After you add new fonts, you have to tell W4W
- that the printer can use the new fonts. Do this by selecting "Printer
- Setup" from the W4W main "File" menu item, click on the "Setup" button,
- and then click on two "Ok" buttons to back out of the setup mode.
-
- Note concerning Windows 3.1 upgrade:
-
- There are two upgrade packages available from Microsoft for Win3.1.
- There is the standard version which contains TypeType support, and
- about six font families (Times New Roman, Arial, Courier, Symbols,
- Wingdings, etc.). It costs something like $50 (US). The second version
- contains a number of TrueType fonts that includes equivalents for the
- 35 standard Postscript fonts. This adds an additional $50, which is a
- pretty good value. However, if you plan on buying Microsoft's
- PowerPoint, it includes the same additional fonts/typefaces. So you can
- save money by not buying the fonts twice.
-
- More about Windows
-
- Q: Why are don't the TrueType fonts that come with Microsoft products
- (Word-for-Windows, PowerPoint, Windows 3.1 TrueType Font Pack, etc.)
- display and print properly on my system?
-
- A: The font matching algorithm in Win3.1 is fairly simplistic. If you
- install lots of TrueType fonts, the algorithm can get confused. In
- this case, "lots" is more than 50 or so.
-
- According to Luann Vodder who supports Microsoft Word on CompuServ:
-
- "There is a procedure which Windows must go through when an
- application requests a font. Each font contains a list of
- attributes such as Family, FaceName, Height, Width, Orientation,
- Weight, Pitch, etc. When an application requests a font, it fills
- out a logical font for Windows containing the necessary attributes,
- then starts going through a font mapping algorithm to determine
- which of the installed fonts most closely matches the requested
- (logical) font. Penalties are applied against fonts whose
- attributes do not match the logical font, until the fonts with the
- fewest penalties are determined. If there is a "tie", Windows may
- need to rely on the order of the fonts in the WIN.INI file to
- determine the "winner".
-
- If the fonts you want are in your WIN.INI file, and show up in
- Windows' Control Panel, then try moving them higher in your WIN.INI
- file with a file edittor such as SYSEDIT.
-
- Kesh Govinder <govinder@ph.und.ac.za> suggested the following warning:
-
- CAUTION: While many Windows 3.1 users would like to have many
- TrueType fonts at their disposal (and they are many available in the
- PD) a word of caution. A large number (>50) TT fonts will slow down
- your windows startup time. This occurs as every installed font is
- listed in the win.ini file, and Windows has to go through the entire
- file before starting up. While this may not affect most users, it
- will especially affect users of CorelDraw!, so be warned.
-
- Other Programs
-
- It is an unfortunate fact that almost all MS-DOS programs do things
- differently. Your best bet is to read the manual that comes with the
- program you want to use.
-
- 3. Font utilities
-
- PS2PK
-
- PS2PK allows you to convert PostScript Type1 fonts into bitmap fonts.
- The bitmap files produced are in TeX PK format.
-
- PKtoSFP
-
- PKtoSFP allows you to convert TeX PK fonts into HP LaserJet softfonts.
-
- PFBDir/PFBInfo
-
- PFBDir and PFBInfo format and display the "headers" in a binary Type1
- font.
-
- 4. Converting Macintosh Type1 fonts to MS-DOS format
-
- Converting Macintosh Type1 fonts into PC Type1 fonts can be done using
- purely free/shareware tools. I've outlined the procedure below. Make
- sure you read the "readme" files that accompany many fonts. Some font
- authors specifically deny permission to do cross-platform conversions.
-
- THE TOOLS YOU NEED:
- -------------------
-
- XBIN: xbin23.zip in /pub/msdos/mac on oak.oakland.edu (or other mirrors)
- UNSIT: unsit30.zip in /pub/msdos/mac on oak.oakland.edu
- UNCPT: ext-pc.zip in /pub/pc/win3/util on ftp.cica.indiana.edu
- REFONT: refont11.zip in /pub/pc/win3/fonts on ftp.cica.indiana.edu
- BMAP2AFM: bm2af01.zip in /pub/norm/mac-font-tools on ibis.cs.umass.edu
-
- XBIN converts Mac "BinHex"ed files back into binary format. BinHex is
- the Mac equivalent of UUencoding, it translates files into ascii characters
- so that mailers can send them around without difficulty. It also aids in
- cross platform copying too, I'm sure. BinHexed files generally have
- filenames of the form "xxx.yyy.HQX".
-
- UNSIT explodes "Stuffit" archives. Stuffit archives generally have
- filenames of the form "xxx.SIT".
-
- UNCPT explodes "Compactor" archives. The ext-pc implementation is called
- "extract" and does not require windows (even thought it's in the windows
- section on cica). Compactor archives generally have filenames of the
- form "xxx.CPT".
-
- REFONT converts Mac type1 fonts into PC type1 fonts.
-
- BMAP2AFM constructs AFM files from the metric information contained in
- Mac screen fonts (.bmap files). The screen font files do not have any
- standard name (although they frequently have the extension .bmap). The
- screen fonts have file type "FFIL" which, in combination with some common
- sense, is usually sufficient to identify them.
-
- I've listed the tools that I've used and the sites that are reasonable
- for me to retrieve them from. It's probably a good idea to check with
- archie for closer sites if you're not in North America. These tools run
- under MS-DOS. XBIN and UNSIT can also be run under Unix.
-
- HOW TO DO IT:
- -------------
-
- Collect the Mac fonts from the archive or BBS of your choice. Most of
- these files will be in BinHexed format. As a running example, I'm going
- to use the imaginary font "Plugh.cpt.hqx". When I download this font to
- my PC, I would use the name "PLUGH.CPX". The actual name you use is
- immaterial.
-
- Run XBIN on PLUGH.CPX. This will produce PLUGH.DAT, PLUGH.INF, and
- PLUGH.RSR. The data fork of the Mac file (the .DAT file) is the only one
- of interest to us, you can delete the others.
-
- If the original file had been "Plugh.sit.hqx", we would be using the
- UNSIT program. Since I chose a .cpt file for this example, I'm going to
- run UNCPT.
-
- Run UNCPT on PLUGH.DAT. You want to extract the AFM file (if present),
- the documentation or readme file (if present), and the Type1 outline
- file. The AFM and README files will be in the data fork of the archive
- file. The Type1 outline will be in the resource fork. The AFM and
- README files have Mac "TEXT" type. The Type1 outline file has "LWFN"
- type. I'm not trying to describe this part in a step-by-step fashion.
- Use the docs for UNCPT and UNSIT as a guide. If you got this far you
- probably won't have much difficulty. If you do, drop me a line and I'll
- try to help.
-
- If the font does not contain an AFM file, extract the screen font.
- Screen fonts frequently have the extension .bmap and are "FFIL" type
- files. Use Bmap2AFM to construct an AFM from the screen font. If the
- archive _does_ contain an AFM file, it's safe to bet that the author's
- AFM will be better than the one created by Bmap2AFM.
-
- Finally, run REFONT on the Type1 outline that you extracted above. The
- result should be an appropriate PC type1 outline. REFONT will create a
- PFM file for you from the AFM file, if you desire.
-
- Remember to register your shareware...
-
- 5.1 Converting PC Type1 fonts into TeX PK bitmap fonts
-
- The release of PS2PK by Piet Tutelaers <rcpt@urc.tue.nl> is a godsend to
- those of us without PostScript printers. PS2PK converts PC/Unix format
- Type 1 fonts into TeX PK files. Used in conjunction with the AFM2TFM
- utility for creating TeX metric files, this allows almost anyone to use
- Type 1 PostScript fonts. PS2PK is distributed under the GNU License and
- has been made to run under MS-DOS with DJGPP's free GNU C compiler. The
- PC version requires a 386 or more powerful processor. Check with Archie
- for a source near you.
-
- Note: if TeX PK files are not directly usable for you, there seems to be
- a fair possibility that LaserJet softfonts would be useful. If so, check
- below for instructions on converting TeX PK files to LaserJet softfonts.
-
- 5.2 Converting TeX PK bitmaps into HP LaserJet softfonts (and vice-versa)
-
- There is some possibility that someone will yell 'conflict of interest'
- here, but I don't think so. I wrote the following utilities:
-
- PKtoSFP: convert TeX PK files to LaserJet (bitmapped) softfonts
- SFPtoPK: convert LaserJet (bitmapped) softfonts to TeX PK files
-
- But they are completely free, so I don't gain anything by "advertising"
- them here. These are MS-DOS platform solutions only. If you know of
- other solutions, I would be happy to list them.
-
- 5.3. TrueType to HP LaserJet bitmap softfonts (HACK!)
-
- If you have the tools, the following suggestion does work, but it
- isn't easy and it hasn't been automated. To be honest, I haven't
- really tested it.
-
- If you are using Windows 3.1, get a LaserJet printer driver (you don't
- need the printer, just the driver). Using the LaserJet driver, direct
- output to a file and print a simple file containing all the letters you
- want in the softfont in the font that you are converting. When the print
- job has completed, the output file will contain, among other things, a
- LaserJet softfont of the TrueType font you selected. If you know the
- LaserJet format, you can grab it out of there.
-
- I didn't say it was easy ;-)
-
- This method will not work with ATM [ed: as of 7/92] because ATM does
- not construct a softfont; it downloads the whole page as graphics.
-
- Here is an overview of the LaserJet bitmap softfont format. It should
- help you get started. If you have any questions, ask norm
- <walsh@cs.umass.edu>. If anyone wants to write better instructions... ;-)
-
- Many details are omitted from this description. They are thoroughly
- discussed in the HP Technical Reference for each model of laser printer.
- I recommend purchasing the Tech Ref. If you have additional questions
- and do not plan to purchase the Tech Ref (or do not wish to wait for its
- arrival), you can ask norm <walsh@cs.umass.edu>.
-
- An HP LaserJet softfont can occur almost anywhere in the output stream
- destined for the printer. In particular, it does _not_ have to be
- wholly contiguous within the output file. In fact, fonts can be
- "intermixed" at will. The following "pieces" make up a font:
-
- A begin font descriptor command (followed by the descriptor) and a
- series of begin character descriptor commands (followed by their
- associated data). When a new character descriptor is encountered, it
- is added to the _current_ font (which may change between descriptors).
-
- In the discussion that follows, the following notational conventions
- are followed:
-
- Key elements are surrounded by quotation marks. The quotation marks
- are not part of the element. Spaces within the element are for
- clarity only, they are not part of the element. All characters
- (except ESC and #, described below, are _literal_ and must be
- entered in the precise case shown).
-
- ESC means the escape character, ASCII character number 27 decimal.
-
- # means any decimal number. The meaning of the number is described
- in the commentary for that element.
-
- What is a font descriptor? A font descriptor begins with a font
- descriptor command and is followed immediately by the data for the
- descriptor. Font descriptors define data global to the font. In
- general, more recent printers are less strict about these parameters
- than older printers.
-
- What is the font descriptor command?
-
- "ESC ) s # W"
-
- In this command, # is the number of bytes in the descriptor. The
- first element of the descriptor indicates how many of these bytes
- should be interpreted as the font descriptor (the remaining bytes
- are commentary only--to the printer, at least). This area is
- frequently used for copyright information, for example, although
- some systems insert kerning data into this area.
-
- What is the font descriptor data?
-
- The data is:
-
- UI Font descriptor size
- UB Descriptor format
- UB Font type
- UI Reserved (should be 0)
- UI Baseline distance
- UI Cell width
- UI Cell height
- UB Orientation
- B Spacing
- UI Symbol set
- UI Pitch
- UI Height
- UI xHeight
- SB Width Type
- UB Style
- SB Stroke Weight
- UB Typeface LSB
- UB Typeface MSB
- UB Serif Style
- SB Underline distance
- UB Underline height
- UI Text Height
- UI Text Width
- UB Pitch Extended
- UB Height Extended
- UI Cap Height
- UI Reserved (0)
- UI Reserved (0)
- A16 Font name
- ?? Copyright, or any other information
-
- Where, UI=unsigned integer, SI=signed integer,
- UB=unsigned byte, SB=signed byte,
- B=boolean, A16=sixteen bytes of ASCII
-
- After the font name, ?? bytes of extra data may be inserted. These
- bytes pad the descriptor out to the length specified in the begin
- font descriptor command.
-
- Note: integers are _always_ in big-endian order (MSB first).
-
- What is a character descriptor? A character descriptor describes the
- character specific info and the layout of the bitmap. Newer printers
- can accept compressed character bitmaps.
-
- What is a character descriptor command?
-
- "ESC * c # E"
-
- The # is the length of the descriptor, in bytes.
-
- What is the character descriptor data?
-
- UB Format
- B Continuation
- UB Descriptor size
- UB Class
- UB Orientation
- SI Left offset
- SI Top offset
- UI Character width
- UI Character height
- SI Delta X
- ?? Character (bitmap) data.
-
- Although older printers cannot accept characters that include
- continuations, newer printers can. If the "continuation" field is
- 1, the character bitmap data begins immediately after that byte and
- the remaining fields _are not_ present.
-
- Ok, now I understand the data, what do I look for in the output stream?
-
- "ESC * c # D" defines the font number (remember the number).
- "ESC ) s # W" defines the font descriptor (as described above).
- "ESC * c # E" specifies the character code (the #, in this case).
- The next character descriptor maps to this position in
- the font. Characters do not have to appear in any
- particular order.
- "ESC ( s # W" defines the character descriptor (as described above).
-
- Remember, these can occur in any order. Experimentation with the
- particular driver you are using may help you restrict the number of
- different cases that you have to be prepared for.
-
- Please report your experiences using this method to norm
- <walsh@cs.umass.edu> (both to satisfy his own curiosity and to help
- improve the FAQ).
-
- 6. MS-DOS Screen Fonts (EGA/VGA text-mode fonts)
-
- Editors note: the following description was mercilessly stolen from
- comp.archives on 02SEP92. It was originally Yossi Gil's
- <yogi@cs.ubc.ca> posting.
-
-
- FNTCOL12.ZIP contains more than 100 text mode fonts for EGA/VGA displays.
- It includes fonts in different sizes for Hebrew, Greek, Cyrillic, math
- symbols and various type styles including smallcaps and script.
-
- It is available at cs.ubc.ca in /pub/pickup/terse/fntcol12.zip
-
- -- END OF PART III --
-